layui.define(['element', 'api','utils','amis'], function(exports) {
    "use strict";

    /**
     * Button component
     * */
    var MOD_NAME = 'footer',
        $ = layui.jquery,
        utils = layui.utils,
        api = layui.api,
        amis = layui.amis
    ;

    var footer = function(opt) {
        this.option = opt;
    };

    function addDom(option){
        var version = `
        <span>引擎版本：${option.version}</span>
        `

        if(option.version){
            var dom = `
            <div class="layui-footer" id="layui-footer">
                ${option.version===undefined?"":version}
            </div>
        `
        $(option.elem).append(dom);
        }
        
    }


    /**
     * Button start loading
     * */
    footer.prototype.render = function(opt) {

        var option = {
            elem: opt.elem,
            version: opt.version
        }

        addDom(option);


        return new footer(option);
    }


    exports(MOD_NAME, new footer());
});
